package cn.actoncode.boot.module.ai.service.chatmodel;

import org.springframework.stereotype.Service;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

@Service
public class ChatStrategyContext {

    private final Map<String, ChatStrategyService> nlpStrategyMap = new ConcurrentHashMap<>();

    public ChatStrategyContext(Map<String, ChatStrategyService> strategyMap) {
        this.nlpStrategyMap.putAll(strategyMap);
    }

    public ChatStrategyService getResource(String engine){
        return nlpStrategyMap.get(engine);
    }
}
